using UnityEngine;
using System.Collections;

public class ProjectToGameplayArea : MonoBehaviour
{
	public SidescrollGameplayArea	m_oGameplayArea;
	public bool 					m_bPlaceAtInitOnly;
	
	void Start()
	{
		if(m_oGameplayArea == null)
		{
			GameObject _goAux	=	GameObject.Find("GameplayArea") ;
			m_oGameplayArea		=	_goAux.GetComponent("SidescrollGameplayArea") as SidescrollGameplayArea;
		}
		if(m_bPlaceAtInitOnly)
		{
			m_oGameplayArea.ProjectOnItFromWorld(transform);
			this.enabled = false;
		}
	}
	void Update ()
	{
		m_oGameplayArea.ProjectOnItFromWorld(transform);
	}
}

